import { defineStore } from "pinia";
export const useUserStore = defineStore("user", {
  state() {
    return {
      code: "",
      name: "",
    };
  },

  actions: {
    setUserInfo(code: string, name: string) {
      this.code = code;
      this.name = name;
    },

    getUserInfo() {
      setTimeout(() => {
        this.code = "123";
        this.name = "admin";
      });
    },
  },
});
